\hypertarget{interface_gas_mix}{
\section{GasMix Class Reference}
\label{interface_gas_mix}\index{GasMix@{GasMix}}
}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
(id) -\/ \hyperlink{interface_gas_mix_a49c631a833d3fb09601620ef50ac9527}{initAsNitrox:error:}
\item 
(id) -\/ \hyperlink{interface_gas_mix_a6db29a4f20976bb6c1b9fc55c815a574}{initAsTriMixWithFO2:andFractionOfHelium:error:}
\item 
(id) -\/ \hyperlink{interface_gas_mix_afd2b1ba1022075ab69ee9b989b8a092e}{initWithStdGasForDepth:isMetric:error:}
\item 
(id) -\/ \hyperlink{interface_gas_mix_abf29d9cddb9e6e6f39d49f40fd3ae864}{initAsTriOx}
\item 
(id) -\/ \hyperlink{interface_gas_mix_ac995f129558c0a5e36bf7c337f6a563f}{initAs21\_\-35}
\item 
(id) -\/ \hyperlink{interface_gas_mix_ac163bdb33ad171391ba75b75ceefbbbc}{initAs18\_\-45}
\item 
(id) -\/ \hyperlink{interface_gas_mix_a03490af37fbf5ef06e3bca02112e7afa}{initAs15\_\-55}
\item 
(id) -\/ \hyperlink{interface_gas_mix_a1a8cd3d188f2bb265773f3230100fa6e}{initAs12\_\-65}
\item 
(id) -\/ \hyperlink{interface_gas_mix_af7a00197a66cab700223ee83fdbd5458}{initAs10\_\-70}
\item 
(long) -\/ \hyperlink{interface_gas_mix_a4063775e1cfd101a44f62c25957c8f22}{ENDofGas:isMetric:}
\item 
(long) -\/ \hyperlink{interface_gas_mix_a9aa536b1ed433f477823cc6094534992}{EADofGas:isMetric:}
\item 
(double) -\/ \hyperlink{interface_gas_mix_a44615c66cb79180ecce70efa94e6a5a4}{MOD:isMetric:}
\item 
(double) -\/ \hyperlink{interface_gas_mix_a21c288fa20bce7916a382a4c57a75258}{ppO2:isMetric:}
\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
(long) + \hyperlink{interface_gas_mix_a241903831a16d0864c590f82e4a365b5}{ENDofGasWithFHe:atDepthOf:isMetric:}
\item 
(long) + \hyperlink{interface_gas_mix_acda79229b96212c3afe9eef911326295}{EADofGasWithFN2:atDepthOf:isMetric:}
\end{DoxyCompactItemize}
\subsection*{Properties}
\begin{DoxyCompactItemize}
\item 
\hypertarget{interface_gas_mix_a87ec141b2a18ab61a2fb2021682731d6}{
NSNumber $\ast$ {\bfseries oxygenContent}}
\label{interface_gas_mix_a87ec141b2a18ab61a2fb2021682731d6}

\item 
\hypertarget{interface_gas_mix_ad1bf16b1788def29339de8ea47bad010}{
NSNumber $\ast$ {\bfseries heliumContent}}
\label{interface_gas_mix_ad1bf16b1788def29339de8ea47bad010}

\item 
\hypertarget{interface_gas_mix_ad19d802af6f41012108fe3575a87e80d}{
NSNumber $\ast$ {\bfseries nitrogenContent}}
\label{interface_gas_mix_ad19d802af6f41012108fe3575a87e80d}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\hyperlink{interface_gas_mix}{GasMix} Class. This class models a gas blend by tracking the O2 and Helium content of the mix.

Created: 21/04/11 DBM

Methods: +(long) ENDofGas: (double) fractionOfHelium atDepthOf: (double) depth isMetric: (BOOL) metric +(long) EADofGas: (double) fractionOfNitrogen atDepthOf: (double) depth isMetric: (BOOL) metric -\/(double) MOD -\/(double) ppO2 -\/(double) fO2

Revision History: 22/04/11 Dan MacKay Added the following constructors:
\begin{DoxyItemize}
\item (id) initWithStdGasForDepth:(double) depth isMetric: (BOOL) metric;
\item (id) initAsTriOx;
\item (id) initAs21\_\-35;
\item (id) initAs18\_\-45;
\item (id) initAs15\_\-55;
\item (id) initAs12\_\-65;
\item (id) initAs10\_\-70; 
\end{DoxyItemize}

\subsection{Member Function Documentation}
\hypertarget{interface_gas_mix_a9aa536b1ed433f477823cc6094534992}{
\index{GasMix@{GasMix}!EADofGas:isMetric:@{EADofGas:isMetric:}}
\index{EADofGas:isMetric:@{EADofGas:isMetric:}!GasMix@{GasMix}}
\subsubsection[{EADofGas:isMetric:}]{\setlength{\rightskip}{0pt plus 5cm}-\/ (long) EADofGas: 
\begin{DoxyParamCaption}
\item[{dummy(double)}]{depth}
\item[{isMetric:(BOOL)}]{metric}
\end{DoxyParamCaption}
}}
\label{interface_gas_mix_a9aa536b1ed433f477823cc6094534992}
Instance Method. This method will return the Equivalent Air Depth (EAD) of a Nitrox Object. This method should only be used with Nitrox


\begin{DoxyParams}{Parameters}
{\em depth} & a double value which contains the depth of the dive \\
\hline
{\em isMetric} & a Boolean value, if TRUE the method assumes the depth provided is metric.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a long value containing the END of the Nitrox object 
\end{DoxyReturn}
\hypertarget{interface_gas_mix_acda79229b96212c3afe9eef911326295}{
\index{GasMix@{GasMix}!EADofGasWithFN2:atDepthOf:isMetric:@{EADofGasWithFN2:atDepthOf:isMetric:}}
\index{EADofGasWithFN2:atDepthOf:isMetric:@{EADofGasWithFN2:atDepthOf:isMetric:}!GasMix@{GasMix}}
\subsubsection[{EADofGasWithFN2:atDepthOf:isMetric:}]{\setlength{\rightskip}{0pt plus 5cm}+ (long) EADofGasWithFN2: 
\begin{DoxyParamCaption}
\item[{dummy(double)}]{fractionOfNitrogen}
\item[{atDepthOf:(double)}]{depth}
\item[{isMetric:(BOOL)}]{metric}
\end{DoxyParamCaption}
}}
\label{interface_gas_mix_acda79229b96212c3afe9eef911326295}
Class Method. This method will return the Equivalent Air Depth (EAD) of a mix. This method should only be used with Nitrox mixes


\begin{DoxyParams}{Parameters}
{\em fractionOfNitrogen} & a double value which represents the nitrogen content \\
\hline
{\em depth} & a double value which contains the depth of the dive \\
\hline
{\em isMetric} & a Boolean value, if TRUE the method assumes the depth provided is metric.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a long value containing the EAD of the mix 
\end{DoxyReturn}
\hypertarget{interface_gas_mix_a4063775e1cfd101a44f62c25957c8f22}{
\index{GasMix@{GasMix}!ENDofGas:isMetric:@{ENDofGas:isMetric:}}
\index{ENDofGas:isMetric:@{ENDofGas:isMetric:}!GasMix@{GasMix}}
\subsubsection[{ENDofGas:isMetric:}]{\setlength{\rightskip}{0pt plus 5cm}-\/ (long) ENDofGas: 
\begin{DoxyParamCaption}
\item[{dummy(double)}]{depth}
\item[{isMetric:(BOOL)}]{metric}
\end{DoxyParamCaption}
}}
\label{interface_gas_mix_a4063775e1cfd101a44f62c25957c8f22}
Instance Method. This method will return the Equivalent Narcotic Depth (END) of a Trimix Object. This method should only makes sense to be used with a Trimix object


\begin{DoxyParams}{Parameters}
{\em depth} & a double value which contains the depth of the dive \\
\hline
{\em isMetric} & a Boolean value, if TRUE the method assumes the depth provided is metric.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a long value containing the END of the Trimix object 
\end{DoxyReturn}
\hypertarget{interface_gas_mix_a241903831a16d0864c590f82e4a365b5}{
\index{GasMix@{GasMix}!ENDofGasWithFHe:atDepthOf:isMetric:@{ENDofGasWithFHe:atDepthOf:isMetric:}}
\index{ENDofGasWithFHe:atDepthOf:isMetric:@{ENDofGasWithFHe:atDepthOf:isMetric:}!GasMix@{GasMix}}
\subsubsection[{ENDofGasWithFHe:atDepthOf:isMetric:}]{\setlength{\rightskip}{0pt plus 5cm}+ (long) ENDofGasWithFHe: 
\begin{DoxyParamCaption}
\item[{dummy(double)}]{fractionOfHelium}
\item[{atDepthOf:(double)}]{depth}
\item[{isMetric:(BOOL)}]{metric}
\end{DoxyParamCaption}
}}
\label{interface_gas_mix_a241903831a16d0864c590f82e4a365b5}
Class Method. This method will return the Equivalent Narcotic Depth (END) of a mix


\begin{DoxyParams}{Parameters}
{\em fractionOfHelium} & a double value which represents the helium content \\
\hline
{\em depth} & a double value which contains the depth of the dive \\
\hline
{\em isMetric} & a Boolean value, if TRUE the method assumes the depth provided is metric. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a long value containing the END of the mix 
\end{DoxyReturn}
\hypertarget{interface_gas_mix_af7a00197a66cab700223ee83fdbd5458}{
\index{GasMix@{GasMix}!initAs10\_\-70@{initAs10\_\-70}}
\index{initAs10\_\-70@{initAs10\_\-70}!GasMix@{GasMix}}
\subsubsection[{initAs10\_\-70}]{\setlength{\rightskip}{0pt plus 5cm}-\/ (id) initAs10\_\-70 
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
}}
\label{interface_gas_mix_af7a00197a66cab700223ee83fdbd5458}
A Standard Gas Constructor. This constructor will generate a 10/70 Object

\begin{DoxyReturn}{Returns}
id 
\end{DoxyReturn}
\hypertarget{interface_gas_mix_a1a8cd3d188f2bb265773f3230100fa6e}{
\index{GasMix@{GasMix}!initAs12\_\-65@{initAs12\_\-65}}
\index{initAs12\_\-65@{initAs12\_\-65}!GasMix@{GasMix}}
\subsubsection[{initAs12\_\-65}]{\setlength{\rightskip}{0pt plus 5cm}-\/ (id) initAs12\_\-65 
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
}}
\label{interface_gas_mix_a1a8cd3d188f2bb265773f3230100fa6e}
A Standard Gas Constructor. This constructor will generate a 12/65 Object

\begin{DoxyReturn}{Returns}
id 
\end{DoxyReturn}
\hypertarget{interface_gas_mix_a03490af37fbf5ef06e3bca02112e7afa}{
\index{GasMix@{GasMix}!initAs15\_\-55@{initAs15\_\-55}}
\index{initAs15\_\-55@{initAs15\_\-55}!GasMix@{GasMix}}
\subsubsection[{initAs15\_\-55}]{\setlength{\rightskip}{0pt plus 5cm}-\/ (id) initAs15\_\-55 
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
}}
\label{interface_gas_mix_a03490af37fbf5ef06e3bca02112e7afa}
A Standard Gas Constructor. This constructor will generate a 15/55 Object

\begin{DoxyReturn}{Returns}
id 
\end{DoxyReturn}
\hypertarget{interface_gas_mix_ac163bdb33ad171391ba75b75ceefbbbc}{
\index{GasMix@{GasMix}!initAs18\_\-45@{initAs18\_\-45}}
\index{initAs18\_\-45@{initAs18\_\-45}!GasMix@{GasMix}}
\subsubsection[{initAs18\_\-45}]{\setlength{\rightskip}{0pt plus 5cm}-\/ (id) initAs18\_\-45 
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
}}
\label{interface_gas_mix_ac163bdb33ad171391ba75b75ceefbbbc}
A Standard Gas Constructor. This constructor will generate a 18/45 Object

\begin{DoxyReturn}{Returns}
id 
\end{DoxyReturn}
\hypertarget{interface_gas_mix_ac995f129558c0a5e36bf7c337f6a563f}{
\index{GasMix@{GasMix}!initAs21\_\-35@{initAs21\_\-35}}
\index{initAs21\_\-35@{initAs21\_\-35}!GasMix@{GasMix}}
\subsubsection[{initAs21\_\-35}]{\setlength{\rightskip}{0pt plus 5cm}-\/ (id) initAs21\_\-35 
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
}}
\label{interface_gas_mix_ac995f129558c0a5e36bf7c337f6a563f}
A Standard Gas Constructor. This constructor will generate a 21/35 Object

\begin{DoxyReturn}{Returns}
id 
\end{DoxyReturn}
\hypertarget{interface_gas_mix_a49c631a833d3fb09601620ef50ac9527}{
\index{GasMix@{GasMix}!initAsNitrox:error:@{initAsNitrox:error:}}
\index{initAsNitrox:error:@{initAsNitrox:error:}!GasMix@{GasMix}}
\subsubsection[{initAsNitrox:error:}]{\setlength{\rightskip}{0pt plus 5cm}-\/ (id) initAsNitrox: 
\begin{DoxyParamCaption}
\item[{dummy(double)}]{withFractionOfO2}
\item[{error:(NSError $\ast$$\ast$)}]{error}
\end{DoxyParamCaption}
}}
\label{interface_gas_mix_a49c631a833d3fb09601620ef50ac9527}
A Nitrox Constructor. Create a Nitrox object by supplying the fraction of Oxygen.


\begin{DoxyParams}{Parameters}
{\em withFractionOfO2} & a double argument representing the fraction of Oxygen required. \\
\hline
{\em error} & a NSError pointer in the event of initialization failure. The returned error object will contain a description of the problem,\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
id if successful otherwise nil 
\end{DoxyReturn}
\hypertarget{interface_gas_mix_a6db29a4f20976bb6c1b9fc55c815a574}{
\index{GasMix@{GasMix}!initAsTriMixWithFO2:andFractionOfHelium:error:@{initAsTriMixWithFO2:andFractionOfHelium:error:}}
\index{initAsTriMixWithFO2:andFractionOfHelium:error:@{initAsTriMixWithFO2:andFractionOfHelium:error:}!GasMix@{GasMix}}
\subsubsection[{initAsTriMixWithFO2:andFractionOfHelium:error:}]{\setlength{\rightskip}{0pt plus 5cm}-\/ (id) initAsTriMixWithFO2: 
\begin{DoxyParamCaption}
\item[{dummy(double)}]{fO2}
\item[{andFractionOfHelium:(double)}]{fHe}
\item[{error:(NSError $\ast$$\ast$)}]{error}
\end{DoxyParamCaption}
}}
\label{interface_gas_mix_a6db29a4f20976bb6c1b9fc55c815a574}
A Trimix Constructor. Creat a Trimix object by suppling the fraction of Oxygen and the fraction of Helium required in the final mix.


\begin{DoxyParams}{Parameters}
{\em fO2} & a double argument representing the fraction of Oxygen required. \\
\hline
{\em andFractionOfHelium} & a double argument representing the fraction of Helium in the final mix. \\
\hline
{\em error} & a NSError pointer in the event of initialization failure. The returned error object will contain a description of the problem,\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
id if successful, otherwise nil 
\end{DoxyReturn}


There is not too much we can do other than check for negative values and make sure that the fO2 and fHe do not exceed 1.0

\hypertarget{interface_gas_mix_abf29d9cddb9e6e6f39d49f40fd3ae864}{
\index{GasMix@{GasMix}!initAsTriOx@{initAsTriOx}}
\index{initAsTriOx@{initAsTriOx}!GasMix@{GasMix}}
\subsubsection[{initAsTriOx}]{\setlength{\rightskip}{0pt plus 5cm}-\/ (id) initAsTriOx 
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
}}
\label{interface_gas_mix_abf29d9cddb9e6e6f39d49f40fd3ae864}
A Standard Gas Constructor. This constructor will generate a TriOx Object

\begin{DoxyReturn}{Returns}
id 
\end{DoxyReturn}
\hypertarget{interface_gas_mix_afd2b1ba1022075ab69ee9b989b8a092e}{
\index{GasMix@{GasMix}!initWithStdGasForDepth:isMetric:error:@{initWithStdGasForDepth:isMetric:error:}}
\index{initWithStdGasForDepth:isMetric:error:@{initWithStdGasForDepth:isMetric:error:}!GasMix@{GasMix}}
\subsubsection[{initWithStdGasForDepth:isMetric:error:}]{\setlength{\rightskip}{0pt plus 5cm}-\/ (id) initWithStdGasForDepth: 
\begin{DoxyParamCaption}
\item[{dummy(double)}]{depth}
\item[{isMetric:(BOOL)}]{metric}
\item[{error:(NSError $\ast$$\ast$)}]{error}
\end{DoxyParamCaption}
}}
\label{interface_gas_mix_afd2b1ba1022075ab69ee9b989b8a092e}
A Standard Gas Constructor. This constructor will generate a Trimix Object with a standard gas based on the depth provided as an argument. This method will only choose 30/30 in the range between 9ft-\/100ft(27m-\/30m). Shallower than that it will return a nirtrox object. It the depth supplied is greater than the GUE standard gas operating range of 0ft-\/330ft, 0-\/100m then the an a null pointer will be returned.


\begin{DoxyParams}{Parameters}
{\em depth} & a double value representing the maximum depth of the dive. \\
\hline
{\em isMetric} & a Boolean value, if TRUE the constructor assumes the depth provided is metric. \\
\hline
{\em error} & a NSError pointer in the event of initialization failure. The returned error object will contain a description of the problem,\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
id if successful otherwise nil 
\end{DoxyReturn}
\hypertarget{interface_gas_mix_a44615c66cb79180ecce70efa94e6a5a4}{
\index{GasMix@{GasMix}!MOD:isMetric:@{MOD:isMetric:}}
\index{MOD:isMetric:@{MOD:isMetric:}!GasMix@{GasMix}}
\subsubsection[{MOD:isMetric:}]{\setlength{\rightskip}{0pt plus 5cm}-\/ (double) MOD: 
\begin{DoxyParamCaption}
\item[{dummy(double)}]{atPPO2}
\item[{isMetric:(BOOL)}]{metric}
\end{DoxyParamCaption}
}}
\label{interface_gas_mix_a44615c66cb79180ecce70efa94e6a5a4}
Instance Method. This method will calculate the Maximum Operating Depth (MOD) of a \hyperlink{interface_gas_mix}{GasMix} Object.$\backslash$


\begin{DoxyParams}{Parameters}
{\em atPPO2} & a double value which represents the maximum ppO2 that you wish to be exposed to. Suggested values are 1.2 (during the working portion of the dive) and 1.6 (during the deco) \\
\hline
{\em isMetric} & a Boolean value, if TRUE the method returns a value in meters, else the return value is in feet\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a double value representing the MOD of the \hyperlink{interface_gas_mix}{GasMix} object 
\end{DoxyReturn}
\hypertarget{interface_gas_mix_a21c288fa20bce7916a382a4c57a75258}{
\index{GasMix@{GasMix}!ppO2:isMetric:@{ppO2:isMetric:}}
\index{ppO2:isMetric:@{ppO2:isMetric:}!GasMix@{GasMix}}
\subsubsection[{ppO2:isMetric:}]{\setlength{\rightskip}{0pt plus 5cm}-\/ (double) ppO2: 
\begin{DoxyParamCaption}
\item[{dummy(double)}]{atDepth}
\item[{isMetric:(BOOL)}]{metric}
\end{DoxyParamCaption}
}}
\label{interface_gas_mix_a21c288fa20bce7916a382a4c57a75258}
An Instance Method. This method calculates the partial pressure of Oxygen for a given depth.


\begin{DoxyParams}{Parameters}
{\em atDepth} & a double value of the depth that is being tested \\
\hline
{\em isMetric} & a Boolean value, if TRUE the method assumes the input value depth is in meters, else depth is in feet \\
\hline
\end{DoxyParams}


The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
DiveUtilities.h\item 
DiveUtilities.m\end{DoxyCompactItemize}
